package com.sihai.ehr.model.biz;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.sihai.core.BaseEntity;
import com.sihai.ehr.model.sys.SalaryFrameworkEnum;
import com.sihai.ehr.model.sys.SalaryStructureEnum;

/**
 * 薪资统计结果细节
 * 
 * @author henry
 * 
 */
@Entity
public class SalaryStatisticsDetail extends BaseEntity<Long> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 968235952721050043L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	/** 自定义NO */
	@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH }, optional = true)
	@JoinColumn(name = "stat_id")
	private SalaryStatistics salaryStatistics;
	/** 方案名称 */
	private String schemeTitle;
	/** 方案结算结果，有正负 */
	private Float schemeSalary;
	/** 框架类型 */
	@Enumerated(EnumType.STRING)
	private SalaryStructureEnum structType;
	/** 挂钩数据类型 */
	@Enumerated(value = EnumType.STRING)
	private SalaryFrameworkEnum linkedDataType;
	/** 连接规则编号 */
	private Long linkedDataId;
	/** 连接数据标题 */
	private String linkedDataTitle;

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public SalaryStatistics getSalaryStatistics() {
		return salaryStatistics;
	}

	public void setSalaryStatistics(SalaryStatistics salaryStatistics) {
		this.salaryStatistics = salaryStatistics;
	}

	public String getSchemeTitle() {
		return schemeTitle;
	}

	public void setSchemeTitle(String schemeTitle) {
		this.schemeTitle = schemeTitle;
	}

	public Float getSchemeSalary() {
		return schemeSalary;
	}

	public void setSchemeSalary(Float schemeSalary) {
		this.schemeSalary = schemeSalary;
	}

	public SalaryStructureEnum getStructType() {
		return structType;
	}

	public void setStructType(SalaryStructureEnum structType) {
		this.structType = structType;
	}

	public SalaryFrameworkEnum getLinkedDataType() {
		return linkedDataType;
	}

	public void setLinkedDataType(SalaryFrameworkEnum linkedDataType) {
		this.linkedDataType = linkedDataType;
	}

	public Long getLinkedDataId() {
		return linkedDataId;
	}

	public void setLinkedDataId(Long linkedDataId) {
		this.linkedDataId = linkedDataId;
	}

	public String getLinkedDataTitle() {
		return linkedDataTitle;
	}

	public void setLinkedDataTitle(String linkedDataTitle) {
		this.linkedDataTitle = linkedDataTitle;
	}
}
